﻿<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:Label ID="lblInstructions" runat="server" Font-Bold="True" Font-Names="Arial"
            Text="Please select an image file"></asp:Label>
        <br/>
        <asp:FileUpload ID="UploadFile" runat="server" Width="631px" />
        <asp:Button ID="btnSubmit" runat="server" Height="20px" OnClick="btnSubmit_Click"
            Text="Upload" Width="78px" />
        <br/>
        <br />
        <asp:Label ID="lblException" runat="server" Font-Bold="True" Font-Names="Arial"
            Text="ERRORS : If any exist" ForeColor="Red"></asp:Label>
        <br />        
        <asp:Literal ID="litException" runat="server"></asp:Literal>
        <br/>
        <br />
        <asp:PlaceHolder id="plImage" Runat="server"></asp:PlaceHolder>
        <br />
        <br />
        <asp:Label ID="lblSeeAll" runat="server" Font-Bold="True" Font-Names="Arial"
            Text="View all saved images from SQL database"></asp:Label>
        <br />
        <br />
        <asp:Button ID="btnSeeAll" runat="server" Height="20px"  Text="See All Images" Width="115px" OnClick="btnSeeAll_Click" />            
        <br />
        <br />
		<asp:datalist id="dlImages" Runat="server" Width="90%" ItemStyle-HorizontalAlign="Left" RepeatLayout="Table"
		    RepeatDirection="Horizontal" RepeatColumns="4" OnItemDataBound="dlImages_ItemDataBound">
		<ItemTemplate>
		    <asp:Image id="imgThumbnail" runat="server" borderSize="5" />
		</ItemTemplate>
		</asp:datalist>            
        <br/>        
    </div>
    </form>
</body>
</html>
